const Router = require('@koa/router');
const { register, login, getMe } = require('../controllers/userController');
const auth = require('../middleware/auth');

const router = new Router({
    prefix: '/api/v1/users',
});

// 注册路由
router.post('/register', register);

// 登录路由
router.post('/login', login);

// 获取当前用户信息路由（需要认证）
router.get('/me', auth, getMe);

module.exports = router;